package edu.hitsz.propfactory;

import edu.hitsz.aircraft.AbstractEnemy;
import edu.hitsz.prop.AbstractProp;

/**
 *抽象类工厂，用来创建三种道具
 */
public abstract class PropFactory {
    protected int locationX;
    protected int locationY;
    protected int speedX;
    protected int speedY;

    public void setProp(AbstractEnemy vanishedEnemy) {
        locationX = vanishedEnemy.getLocationX();
        locationY = vanishedEnemy.getLocationY();
        speedX = 0;
        speedY = 3;
    }
    public abstract AbstractProp createProp(AbstractEnemy vanishedEnemy);
}
